<%--
  Created by IntelliJ IDEA.
  User: 陌·笙
  Date: 2019-01-10
  Time: 15:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <title>登录页面</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- CSS -->
    <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=PT+Sans:400,700'>
    <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Oleo+Script:400,700'>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/style.css">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>
<body>
<div class="register-container container" style="margin-top: 200px">
    <div class="row">
        <div class="iphone span5">
            <img src="assets/img/iphone.png" width="260" alt="">
        </div>
        <div class="register span6">
            <form action="/login/exits" method="post">
                <h2>后台<span class="red"><strong>iAPP</strong></span></h2>
                <label for="firstname">用户名:</label>
                <input type="text" id="firstname" name="aname" style="height: 40px" placeholder="请输入你的用户名">
                <label for="password">密码:</label>
                <input type="password" id="password" name="apwd" style="height: 40px" placeholder="请输入密码">
                <button type="submit">登录</button>
            </form>
        </div>
    </div>
</div>

<!-- Javascript -->
<script src="${pageContext.request.contextPath}/assets/js/jquery-1.8.2.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/bootstrap/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/jquery.backstretch.min.js"></script>
<script>

    jQuery(document).ready(function() {

        /*
            Background slideshow
        */
        $.backstretch([
            "assets/img/backgrounds/1.jpg"
            , "assets/img/backgrounds/2.jpg"
            , "assets/img/backgrounds/3.jpg"
        ], {duration: 3000, fade: 750});

        /*
            Tooltips
        */
        $('.links a.home').tooltip();
        $('.links a.blog').tooltip();

        /*
            Form validation
        */
        $('.register form').submit(function(){
            $(this).find("label[for='firstname']").html('用户名');
            $(this).find("label[for='password']").html('密码');
            ////
            var firstname = $(this).find('input#firstname').val();
            var password = $(this).find('input#password').val();
            if(firstname == '') {
                $(this).find("label[for='firstname']").append("<span style='display:none' class='red'> - 请输入用户名.</span>");
                $(this).find("label[for='firstname'] span").fadeIn('medium');
                return false;
            }
            if(password == '') {
                $(this).find("label[for='password']").append("<span style='display:none' class='red'> - 请输入密码.</span>");
                $(this).find("label[for='password'] span").fadeIn('medium');
                return false;
            }
        });


    });



</script>

</body>
</html>
